<?php
class Macys_Api_V2_Catalog_Category_StaticInfo {

	private static $m_pInstance;
	private $currentSite;

	public function __construct($siteName){
		$this->currentSite = $siteName;
	}

	/**
	 * Used for generating the Static Menu of Categories
	 * Enter description here ...
	 */
	public function getStaticCategories() {
		if($this->currentSite == Macys_Base_Session::BCOMSITE) {
			return $this->getBcomCategories();
		}
		else {
			return $this->getMcomCategories();
		}
	}

	private function getBcomCategories() {
		$bcom = array (
		2910 => "WOMEN",
		2911 => "CONTEMPORARY",
		16961 => "SHOES",
		16958 => "HANDBAGS",
		3376 => "JEWELRY & ACCESSORIES",
		2921 => "BEAUTY",
		3864 => "MEN",
		3866 => "KIDS",
		3865 => "HOME",
		3977 => "SALE"
		);
		return $this->getNavigationArray($bcom);
	}

	private function getMcomCategories() {
		$cat = array(

		22672 => "for the home",
		7495 => "bed & bath",
		118 => "women",
		1 => "men",
		16904 => "juniors",
		5991 => "kids",
		669 => "beauty & fragrance",
		13247 => "shoes",
		26846 => "handbags & accessories",
		544 => "jewelry & watches",
		3536 => "sale"
		);
		return $this->getNavigationArray($cat);
		/*
		 $res = array();
		 foreach ($cat as $k => $value) {
			$res[] = $this->navCat($k, $value);
			}
			return $res; */
	}

	private function getNavigationArray($arr) {
		$res = array();
		foreach ($arr as $k => $value) {
			$res[] = $this->navCat($k, $value);
		}
		return $res;
	}

	private function navCat($id, $name="test") {
		$parent['module'] = 'default';
		$parent['controller'] = 'category';
		$parent['action'] = 'getcategoryv2';
		$parent['label'] = $name;
		$parent['params'] = array ('categoryId' => $id);
		return $parent;
	}
}